<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery/jquery1.9/jquery-1.9.0.js"></script>
    <script>
        $(function(){
            $("#btn").click(function(){

                //对div的文本值进行重新设置
                // $(".mydiv").html("我是小蒋");

                //对文本框的值进行重新赋值
                // $("#txt").val("我是晶晶");

                // $(".mydiv").css("font-size","30px");
                // $(".mydiv").css("color","red");
                // $(".mydiv").css("border","1px solid red");


                //链式写法
                // $(".mydiv").css("font-size","30px").css("color","yellow").css("border","1px solid red").css("width","100px").css("height","200px");
                // $(".mydiv").css("font-size","30px").css("color","yellow").css("border","1px solid red").width(300).height(500);

                //传递对象(对象字面量、JSON对象)
                // $(".mydiv").css(对象);
                $(".mydiv").css({
                    color:"red",
                    "background":"blue",
                    "font-size":"50px"
                });
            });
        });
    </script>
</head>
<body>
    <input type="button" value="我是按钮" id="btn">
    <div class="mydiv">this is div</div>
    <input type="text" value="嘿嘿" id="txt">
</body>
</html>